n, x, y = list(map(int, input().split()))
def f(n, x, y):
    if n == 1:
        return x
    if n == 2:
        return x + min(x , y)
    if n % 2 == 0:
        return f(n // 2, x, y) + min(y, x * n//2)
    else:
        return x+min(f(n-1, x, y), f(n+1, x, y))
        
        
print(f(n, x, y))
